<?php

namespace app\admin\validate;

use think\Validate;

class Hospital extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'name'  => 'require|length:50',
        'type'  => 'require|length:10',
        'level' => 'require|length:10',
        'ace'   => 'require|length:100',
        'thumb' => 'require|length:200',
    ];

    /**
     * 字段描述
     */
    protected $field = [
    ];
    /**
     * 提示消息
     */
    protected $message = [
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['name','type','level','ace','thumb'],
        'edit' => ['name','type','level','ace','thumb'],
    ];

    public function __construct()
    {
        $this->field = [
            'name'  => __('name'),
            'type'  => __('type'),
            'level' => __('level'),
            'ace'   => __('ace'),
            'thumb' => __('thumb'),
        ];
        parent::__construct();
    }
}
